﻿#ifndef CQUESTION_H
#define CQUESTION_H

#include "sharedDefine.h"

#include <qsqlquery.h>


class CQuestion
{
public:
    CQuestion();

    static int getQuestionAcount();
    static int getAllQuestions(stQuestion* questionBuffer, int questionsSize);
    static int queryQuestionsTable(stQuestion *questionBuffer, int questionsSize, QString colName, QString condition,
                     bool isDataBack);
    /**
     * @brief isExistQuestion
     * @param colName       列名
     * @param condition     限制条件（md5=？）
     * @return
     */
    static bool isExistQuestion(QString colName, QString condition);


};

#endif // CQUESTION_H
